<#macro greet javaType javaProperty getterMethodName>

    <#if javaType == "String" >
        target.${javaProperty}=source.${getterMethodName}();
    <#else>
        if (source.${getterMethodName}()!=null){
            target.${javaProperty}=source.${getterMethodName}();
        }
    </#if>
</#macro>

private Target dto2User(Source source) {
    Target target=new Target();

<#list table.columns as column>

    <#if column.columnName!='data_status' && column.columnName != 'create_time'&& column.columnName != 'update_time'>
        <@greet javaType="${column.javaType}" javaProperty="${column.javaProperty}" getterMethodName="${column.getterMethodName}"/>

    </#if>
</#list>

  return target;

}